<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">

<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>/home/bernd/src/izot/shortstack/api/ldv.h</title><link rel="stylesheet" type="text/css" href="../styles/main.css"><script language=JavaScript src="../javascript/main.js"></script><script language=JavaScript src="../javascript/prettify.js"></script><script language=JavaScript src="../javascript/searchdata.js"></script></head><body class="ContentPage" onLoad="NDOnLoad();prettyPrint();"><script language=JavaScript><!--
if (browserType) {document.write("<div class=" + browserType + ">");if (browserVer) {document.write("<div class=" + browserVer + ">"); }}// --></script>

<!--  Generated by Natural Docs, version 1.52 -->
<!--  http://www.naturaldocs.org  -->

<!-- saved from url=(0026)http://www.naturaldocs.org -->




<div id=Content><div class="CFile"><div class=CTopic id=MainTopic><h1 class=CTitle><a name="ldv.h"></a>ldv.h</h1><div class=CBody><!--START_ND_SUMMARY--><div class=Summary><div class=STitle>Summary</div><div class=SBorder><table border=0 cellspacing=0 cellpadding=0 class=STable><tr class="SMain"><td class=SEntry><a href="#ldv.h" >ldv.h</a></td><td class=SDescription></td></tr><tr class="SGroup"><td class=SEntry><a href="#Functions" >Functions</a></td><td class=SDescription></td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#LdvOpen" id=link1 onMouseOver="ShowTip(event, 'tt1', 'link1')" onMouseOut="HideTip('tt1')">LdvOpen</a></td><td class=SDescription>LdvOpen() succeeds the LdvInit() function. </td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#LdvClose" id=link2 onMouseOver="ShowTip(event, 'tt2', 'link2')" onMouseOut="HideTip('tt2')">LdvClose</a></td><td class=SDescription>LdvClose() completes all pending downlink traffic and closes the driver. </td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#LdvAllocateMsg" id=link3 onMouseOver="ShowTip(event, 'tt3', 'link3')" onMouseOut="HideTip('tt3')">LdvAllocateMsg</a></td><td class=SDescription>LdvAllocateMsg() allocates a transmit buffer. </td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#LdvAllocateMsgWait" id=link4 onMouseOver="ShowTip(event, 'tt4', 'link4')" onMouseOut="HideTip('tt4')">LdvAllocateMsgWait</a></td><td class=SDescription>LdvAllocateMsgWait() allocates a transmit buffer, and waits a suitable time, if necessary, until one becomes available. </td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#LdvPutMsg" id=link5 onMouseOver="ShowTip(event, 'tt5', 'link5')" onMouseOut="HideTip('tt5')">LdvPutMsg</a></td><td class=SDescription>LdvPutMsg() submits a message for downlink transfer. </td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#LdvGetMsg" id=link6 onMouseOver="ShowTip(event, 'tt6', 'link6')" onMouseOut="HideTip('tt6')">LdvGetMsg</a></td><td class=SDescription>LdvGetMsg() retrieves an incoming message (if any). </td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#LdvReleaseMsg" id=link7 onMouseOver="ShowTip(event, 'tt7', 'link7')" onMouseOut="HideTip('tt7')">LdvReleaseMsg</a></td><td class=SDescription>LdvReleaseMsg() releases the message buffer after processing is complete.</td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#LdvReset" id=link8 onMouseOver="ShowTip(event, 'tt8', 'link8')" onMouseOut="HideTip('tt8')">LdvReset</a></td><td class=SDescription>LdvReset() resets the driver in a brute force operation, abandoning and dismissing any partial transfers.</td></tr><tr class="SFunction SIndent1 SMarked"><td class=SEntry><a href="#LdvSuspend" id=link9 onMouseOver="ShowTip(event, 'tt9', 'link9')" onMouseOut="HideTip('tt9')">LdvSuspend</a></td><td class=SDescription>LdvSuspend() is an optional feature; drivers not supporting this operation may do nothing but return LonApiNotSupported. </td></tr><tr class="SFunction SIndent1"><td class=SEntry><a href="#LdvResume" id=link10 onMouseOver="ShowTip(event, 'tt10', 'link10')" onMouseOut="HideTip('tt10')">LdvResume</a></td><td class=SDescription>LdvResume() resumes a previously suspended driver.</td></tr></table></div></div><!--END_ND_SUMMARY--></div></div></div>

<div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="Functions"></a>Functions</h3></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="LdvOpen"></a>LdvOpen</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>extern LonApiError LdvOpen(</td><td class="PTypePrefix  prettyprint " nowrap>const&nbsp;</td><td class="PType  prettyprint " nowrap>LdvCtrl&nbsp;</td><td class="PParameterPrefix  prettyprint " nowrap>*</td><td class="PParameter  prettyprint " nowrap>ctrl,</td></tr><tr><td></td><td class="PTypePrefix  prettyprint " nowrap></td><td class="PType  prettyprint " nowrap>LdvHandle&nbsp;</td><td class="PParameterPrefix  prettyprint " nowrap>*</td><td class="PParameter  prettyprint " nowrap>handle</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>LdvOpen() succeeds the LdvInit() function.&nbsp; It prepares the IzoT ShortStack link layer driver and returns a valid handle or 0 through the handle output parameter.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>ctrl</td><td class=CDLDescription>a pointer to the driver-specific &lt;LdvCtrl&gt; control data structure.</td></tr><tr><td class=CDLEntry>handle</td><td class=CDLDescription>output parameter, pointer to &lt;LdvHandle&gt;.</td></tr></table><h4 class=CHeading>Result</h4><p><a href="ShortStackTypes-h.html#LonApiError" class=LType id=link11 onMouseOver="ShowTip(event, 'tt11', 'link11')" onMouseOut="HideTip('tt11')">LonApiError</a>.</p></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="LdvClose"></a>LdvClose</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>extern LonApiError LdvClose(</td><td class="PType  prettyprint " nowrap>LdvHandle&nbsp;</td><td class="PParameter  prettyprint " nowrap>handle</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>LdvClose() completes all pending downlink traffic and closes the driver.&nbsp; The handle is no longer valid when LdvClose() returns.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>handle</td><td class=CDLDescription>the driver handle obtained from <a href="#LdvOpen" class=LFunction id=link12 onMouseOver="ShowTip(event, 'tt1', 'link12')" onMouseOut="HideTip('tt1')">LdvOpen</a>.</td></tr></table><h4 class=CHeading>Result</h4><p><a href="ShortStackTypes-h.html#LonApiError" class=LType id=link13 onMouseOver="ShowTip(event, 'tt11', 'link13')" onMouseOut="HideTip('tt11')">LonApiError</a>.</p></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="LdvAllocateMsg"></a>LdvAllocateMsg</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>extern LonApiError LdvAllocateMsg(</td><td class="PType  prettyprint " nowrap>LdvHandle&nbsp;</td><td class="PParameterPrefix  prettyprint " nowrap></td><td class="PParameter  prettyprint " nowrap>handle,</td></tr><tr><td></td><td class="PType  prettyprint " nowrap>LonSmipMsg&nbsp;</td><td class="PParameterPrefix  prettyprint " nowrap>**</td><td class="PParameter  prettyprint " nowrap>pFrame</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>LdvAllocateMsg() allocates a transmit buffer.&nbsp; A successfully allocated buffer is always cleared to zeroes, and has a quasi-unique Id assigned.&nbsp; The Id number may be helpful when logging frame data for debugging purposes, but is otherwise irrelevant.&nbsp; The ShortStack API imposes no meaning on this number.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>handle</td><td class=CDLDescription>the driver handle obtained from <a href="#LdvOpen" class=LFunction id=link14 onMouseOver="ShowTip(event, 'tt1', 'link14')" onMouseOut="HideTip('tt1')">LdvOpen</a>.</td></tr><tr><td class=CDLEntry>pFrame</td><td class=CDLDescription>output parameter, pointer to a LonSmipMsg* pointer variable.</td></tr></table><h4 class=CHeading>Result</h4><p><a href="ShortStackTypes-h.html#LonApiError" class=LType id=link15 onMouseOver="ShowTip(event, 'tt11', 'link15')" onMouseOut="HideTip('tt11')">LonApiError</a>.</p></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="LdvAllocateMsgWait"></a>LdvAllocateMsgWait</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>extern LonApiError LdvAllocateMsgWait(</td><td class="PType  prettyprint " nowrap>LdvHandle&nbsp;</td><td class="PParameterPrefix  prettyprint " nowrap></td><td class="PParameter  prettyprint " nowrap>handle,</td></tr><tr><td></td><td class="PType  prettyprint " nowrap>LonSmipMsg&nbsp;</td><td class="PParameterPrefix  prettyprint " nowrap>**</td><td class="PParameter  prettyprint " nowrap>pFrame</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>LdvAllocateMsgWait() allocates a transmit buffer, and waits a suitable time, if necessary, until one becomes available.&nbsp; This API is only used during initialization of the application.</p><p>Note this API may still fail, for example with LonApiTimeout.&nbsp; When successful, this function returns a frame conditioned in the same way as with <a href="#LdvAllocateMsg" class=LFunction id=link16 onMouseOver="ShowTip(event, 'tt3', 'link16')" onMouseOut="HideTip('tt3')">LdvAllocateMsg</a>.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>handle</td><td class=CDLDescription>the driver handle obtained from <a href="#LdvOpen" class=LFunction id=link17 onMouseOver="ShowTip(event, 'tt1', 'link17')" onMouseOut="HideTip('tt1')">LdvOpen</a>.</td></tr><tr><td class=CDLEntry>pFrame</td><td class=CDLDescription>output parameter, pointer to a LonSmipMsg* pointer variable.</td></tr></table><h4 class=CHeading>Result</h4><p><a href="ShortStackTypes-h.html#LonApiError" class=LType id=link18 onMouseOver="ShowTip(event, 'tt11', 'link18')" onMouseOut="HideTip('tt11')">LonApiError</a>.</p></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="LdvPutMsg"></a>LdvPutMsg</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>extern LonApiError LdvPutMsg(</td><td class="PType  prettyprint " nowrap>LdvHandle&nbsp;</td><td class="PParameterPrefix  prettyprint " nowrap></td><td class="PParameter  prettyprint " nowrap>handle,</td></tr><tr><td></td><td class="PType  prettyprint " nowrap>LonSmipMsg&nbsp;</td><td class="PParameterPrefix  prettyprint " nowrap>*</td><td class="PParameter  prettyprint " nowrap>pFrame</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>LdvPutMsg() submits a message for downlink transfer.&nbsp; The driver returns the frame buffer to the pool once all data has been transmitted.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>handle</td><td class=CDLDescription>the driver handle obtained from <a href="#LdvOpen" class=LFunction id=link19 onMouseOver="ShowTip(event, 'tt1', 'link19')" onMouseOut="HideTip('tt1')">LdvOpen</a>.</td></tr><tr><td class=CDLEntry>pFrame</td><td class=CDLDescription>pointer to the frame buffer.</td></tr></table><h4 class=CHeading>Result</h4><p><a href="ShortStackTypes-h.html#LonApiError" class=LType id=link20 onMouseOver="ShowTip(event, 'tt11', 'link20')" onMouseOut="HideTip('tt11')">LonApiError</a>.</p></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="LdvGetMsg"></a>LdvGetMsg</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>extern LonApiError LdvGetMsg(</td><td class="PType  prettyprint " nowrap>LdvHandle&nbsp;</td><td class="PParameterPrefix  prettyprint " nowrap></td><td class="PParameter  prettyprint " nowrap>handle,</td></tr><tr><td></td><td class="PType  prettyprint " nowrap>LonSmipMsg&nbsp;</td><td class="PParameterPrefix  prettyprint " nowrap>**</td><td class="PParameter  prettyprint " nowrap>pFrame</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>LdvGetMsg() retrieves an incoming message (if any).&nbsp; When successful, the caller is responsible for returing the frame buffer to the pool with <a href="#LdvReleaseMsg" class=LFunction id=link21 onMouseOver="ShowTip(event, 'tt7', 'link21')" onMouseOut="HideTip('tt7')">LdvReleaseMsg</a>.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>handle</td><td class=CDLDescription>the driver handle obtained from <a href="#LdvOpen" class=LFunction id=link22 onMouseOver="ShowTip(event, 'tt1', 'link22')" onMouseOut="HideTip('tt1')">LdvOpen</a>.</td></tr><tr><td class=CDLEntry>pFrame</td><td class=CDLDescription>output parameter, pointer to a frame buffer pointer.</td></tr></table><h4 class=CHeading>Result</h4><p><a href="ShortStackTypes-h.html#LonApiError" class=LType id=link23 onMouseOver="ShowTip(event, 'tt11', 'link23')" onMouseOut="HideTip('tt11')">LonApiError</a>.</p></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="LdvReleaseMsg"></a>LdvReleaseMsg</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>extern LonApiError LdvReleaseMsg(</td><td class="PType  prettyprint " nowrap>LdvHandle&nbsp;</td><td class="PParameterPrefix  prettyprint " nowrap></td><td class="PParameter  prettyprint " nowrap>handle,</td></tr><tr><td></td><td class="PType  prettyprint " nowrap>LonSmipMsg&nbsp;</td><td class="PParameterPrefix  prettyprint " nowrap>*</td><td class="PParameter  prettyprint " nowrap>pFrame</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>LdvReleaseMsg() releases the message buffer after processing is complete.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>handle</td><td class=CDLDescription>the driver handle obtained from <a href="#LdvOpen" class=LFunction id=link24 onMouseOver="ShowTip(event, 'tt1', 'link24')" onMouseOut="HideTip('tt1')">LdvOpen</a>.</td></tr><tr><td class=CDLEntry>pFrame</td><td class=CDLDescription>pointer to the frame buffer.</td></tr></table><h4 class=CHeading>Result</h4><p><a href="ShortStackTypes-h.html#LonApiError" class=LType id=link25 onMouseOver="ShowTip(event, 'tt11', 'link25')" onMouseOut="HideTip('tt11')">LonApiError</a>.</p></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="LdvReset"></a>LdvReset</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>extern LonApiError LdvReset(</td><td class="PType  prettyprint " nowrap>LdvHandle&nbsp;</td><td class="PParameter  prettyprint " nowrap>handle</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>LdvReset() resets the driver in a brute force operation, abandoning and dismissing any partial transfers.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>handle</td><td class=CDLDescription>the driver handle obtained from <a href="#LdvOpen" class=LFunction id=link26 onMouseOver="ShowTip(event, 'tt1', 'link26')" onMouseOut="HideTip('tt1')">LdvOpen</a>.</td></tr></table><h4 class=CHeading>Result</h4><p><a href="ShortStackTypes-h.html#LonApiError" class=LType id=link27 onMouseOver="ShowTip(event, 'tt11', 'link27')" onMouseOut="HideTip('tt11')">LonApiError</a>.</p></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="LdvSuspend"></a>LdvSuspend</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "colspan=3>#define LDV_SUSPEND_IMMEDIATE 0x11 #define LDV_SUSPEND_SYNCHED 0x22 extern LonApiError LdvSuspend(</td></tr><tr><td>&nbsp;&nbsp;&nbsp;</td><td class="PType  prettyprint " nowrap>LdvHandle&nbsp;</td><td class="PParameter  prettyprint " nowrap width=100%>handle,</td></tr><tr><td>&nbsp;&nbsp;&nbsp;</td><td class="PType  prettyprint " nowrap>unsigned&nbsp;</td><td class="PParameter  prettyprint " nowrap width=100%>mode,</td></tr><tr><td>&nbsp;&nbsp;&nbsp;</td><td class="PType  prettyprint " nowrap>unsigned&nbsp;</td><td class="PParameter  prettyprint " nowrap width=100%>timeout</td></tr><tr><td class="PAfterParameters  prettyprint "colspan=3>)</td></tr></table></td></tr></table></blockquote><p>LdvSuspend() is an optional feature; drivers not supporting this operation may do nothing but return LonApiNotSupported.&nbsp; When the call succeeds, the caller is responsible for calling <a href="#LdvResume" class=LFunction id=link28 onMouseOver="ShowTip(event, 'tt10', 'link28')" onMouseOut="HideTip('tt10')">LdvResume</a>.</p><p>Implementations which support <a href="#LdvSuspend" class=LFunction id=link29 onMouseOver="ShowTip(event, 'tt9', 'link29')" onMouseOut="HideTip('tt9')">LdvSuspend</a> MUST also support <a href="#LdvResume" class=LFunction id=link30 onMouseOver="ShowTip(event, 'tt10', 'link30')" onMouseOut="HideTip('tt10')">LdvResume</a>.</p><p>The ShortStack API does not use this API but provides a simple pass-through <a href="ShortStackApi-h.html#LonSuspend" class=LFunction id=link31 onMouseOver="ShowTip(event, 'tt12', 'link31')" onMouseOut="HideTip('tt12')">LonSuspend</a> API.</p><p>The driver implementation also defines the modes supported and the timeout units.&nbsp; This example implementation supports a timeout in seconds and two suspend modes:</p><p>IMMEDIATE:   Suspend, and discard all work in progress.&nbsp; SYNCHED:     Suspend after pending frame is complete.</p><p>The HRDY signal will be asserted when the uplink path is suspended, if a HRDY GPIO pin assignment was provided with LdvCtrl.</p><p>The operation can time out after &lsquo;timeout&rsquo; seconds.&nbsp; A timeout value of zero can block indefinitely.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>handle</td><td class=CDLDescription>the driver handle obtained from <a href="#LdvOpen" class=LFunction id=link32 onMouseOver="ShowTip(event, 'tt1', 'link32')" onMouseOut="HideTip('tt1')">LdvOpen</a>.</td></tr><tr><td class=CDLEntry>mode</td><td class=CDLDescription>mode flags, defined by the driver.</td></tr></table><h4 class=CHeading>Result</h4><p><a href="ShortStackTypes-h.html#LonApiError" class=LType id=link33 onMouseOver="ShowTip(event, 'tt11', 'link33')" onMouseOut="HideTip('tt11')">LonApiError</a>.</p></div></div></div>

<div class="CFunction"><div class=CTopic><h3 class=CTitle><a name="LdvResume"></a>LdvResume</h3><div class=CBody><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>extern LonApiError LdvResume(</td><td class="PType  prettyprint " nowrap>LdvHandle&nbsp;</td><td class="PParameter  prettyprint " nowrap>handle</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote><p>LdvResume() resumes a previously suspended driver.</p><p>This is an optional feature; drivers not supporting this operation may do nothing but return LonApiNotSupported.</p><p>Implementations should always support both <a href="#LdvSuspend" class=LFunction id=link34 onMouseOver="ShowTip(event, 'tt9', 'link34')" onMouseOut="HideTip('tt9')">LdvSuspend</a> and <a href="#LdvResume" class=LFunction id=link35 onMouseOver="ShowTip(event, 'tt10', 'link35')" onMouseOut="HideTip('tt10')">LdvResume</a> or neither.</p><p>The ShortStack API does not use this API but provides a simple pass-through <a href="ShortStackApi-h.html#LonResume" class=LFunction id=link36 onMouseOver="ShowTip(event, 'tt13', 'link36')" onMouseOut="HideTip('tt13')">LonResume</a> API.</p><h4 class=CHeading>Parameters</h4><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>handle</td><td class=CDLDescription>the driver handle obtained from <a href="#LdvOpen" class=LFunction id=link37 onMouseOver="ShowTip(event, 'tt1', 'link37')" onMouseOut="HideTip('tt1')">LdvOpen</a>.</td></tr></table><h4 class=CHeading>Result</h4><p><a href="ShortStackTypes-h.html#LonApiError" class=LType id=link38 onMouseOver="ShowTip(event, 'tt11', 'link38')" onMouseOut="HideTip('tt11')">LonApiError</a>.</p></div></div></div>

</div><!--Content-->


<div id=Footer><a href="http://www.naturaldocs.org">Generated by Natural Docs</a></div><!--Footer-->


<div id=Menu><div class=MEntry><div class=MFile id=MSelected>ldv.h</div></div><div class=MEntry><div class=MFile><a href="LonPlatform-h.html">LonPlatform.h</a></div></div><div class=MEntry><div class=MFile><a href="ShortStackApi-h.html">SHORTSTACK API</a></div></div><div class=MEntry><div class=MFile><a href="ShortStackIsiApi-h.html">SHORTSTACK ISI API</a></div></div><div class=MEntry><div class=MFile><a href="ShortStackIsiTypes-h.html">SHORTSTACK ISI TYPES</a></div></div><div class=MEntry><div class=MFile><a href="ShortStackTypes-h.html">SHORTSTACK TYPES</a></div></div><div class=MEntry><div class=MFile><a href="ShortStackApi-c.html">ShortStackApi.c</a></div></div><div class=MEntry><div class=MFile><a href="ShortStackHandlers-c.html">ShortStackHandlers.c</a></div></div><div class=MEntry><div class=MFile><a href="ShortStackIsiApi-c.html">ShortStackIsiApi.c</a></div></div><div class=MEntry><div class=MFile><a href="ShortStackIsiHandlers-c.html">ShortStackIsiHandlers.c</a></div></div><div class=MEntry><div class=MGroup><a href="javascript:ToggleMenu('MGroupContent1')">Index</a><div class=MGroupContent id=MGroupContent1><div class=MEntry><div class=MIndex><a href="../index/General.html">Everything</a></div></div><div class=MEntry><div class=MIndex><a href="../index/Files.html">Files</a></div></div><div class=MEntry><div class=MIndex><a href="../index/Functions.html">Functions</a></div></div><div class=MEntry><div class=MIndex><a href="../index/Macros.html">Macros</a></div></div><div class=MEntry><div class=MIndex><a href="../index/Types.html">Types</a></div></div></div></div></div><script type="text/javascript"><!--
var searchPanel = new SearchPanel("searchPanel", "HTML", "../search");
--></script><div id=MSearchPanel class=MSearchPanelInactive><input type=text id=MSearchField value=Search onFocus="searchPanel.OnSearchFieldFocus(true)" onBlur="searchPanel.OnSearchFieldFocus(false)" onKeyUp="searchPanel.OnSearchFieldChange()"><select id=MSearchType onFocus="searchPanel.OnSearchTypeFocus(true)" onBlur="searchPanel.OnSearchTypeFocus(false)" onChange="searchPanel.OnSearchTypeChange()"><option  id=MSearchEverything selected value="General">Everything</option><option value="Files">Files</option><option value="Functions">Functions</option><option value="Macros">Macros</option><option value="Types">Types</option></select></div></div><!--Menu-->



<!--START_ND_TOOLTIPS-->
<div class=CToolTip id="tt1"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>extern LonApiError LdvOpen(</td><td class="PTypePrefix  prettyprint " nowrap>const&nbsp;</td><td class="PType  prettyprint " nowrap>LdvCtrl&nbsp;</td><td class="PParameterPrefix  prettyprint " nowrap>*</td><td class="PParameter  prettyprint " nowrap>ctrl,</td></tr><tr><td></td><td class="PTypePrefix  prettyprint " nowrap></td><td class="PType  prettyprint " nowrap>LdvHandle&nbsp;</td><td class="PParameterPrefix  prettyprint " nowrap>*</td><td class="PParameter  prettyprint " nowrap>handle</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>LdvOpen() succeeds the LdvInit() function. </div></div><div class=CToolTip id="tt2"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>extern LonApiError LdvClose(</td><td class="PType  prettyprint " nowrap>LdvHandle&nbsp;</td><td class="PParameter  prettyprint " nowrap>handle</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>LdvClose() completes all pending downlink traffic and closes the driver. </div></div><div class=CToolTip id="tt3"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>extern LonApiError LdvAllocateMsg(</td><td class="PType  prettyprint " nowrap>LdvHandle&nbsp;</td><td class="PParameterPrefix  prettyprint " nowrap></td><td class="PParameter  prettyprint " nowrap>handle,</td></tr><tr><td></td><td class="PType  prettyprint " nowrap>LonSmipMsg&nbsp;</td><td class="PParameterPrefix  prettyprint " nowrap>**</td><td class="PParameter  prettyprint " nowrap>pFrame</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>LdvAllocateMsg() allocates a transmit buffer. </div></div><div class=CToolTip id="tt4"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>extern LonApiError LdvAllocateMsgWait(</td><td class="PType  prettyprint " nowrap>LdvHandle&nbsp;</td><td class="PParameterPrefix  prettyprint " nowrap></td><td class="PParameter  prettyprint " nowrap>handle,</td></tr><tr><td></td><td class="PType  prettyprint " nowrap>LonSmipMsg&nbsp;</td><td class="PParameterPrefix  prettyprint " nowrap>**</td><td class="PParameter  prettyprint " nowrap>pFrame</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>LdvAllocateMsgWait() allocates a transmit buffer, and waits a suitable time, if necessary, until one becomes available. </div></div><div class=CToolTip id="tt5"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>extern LonApiError LdvPutMsg(</td><td class="PType  prettyprint " nowrap>LdvHandle&nbsp;</td><td class="PParameterPrefix  prettyprint " nowrap></td><td class="PParameter  prettyprint " nowrap>handle,</td></tr><tr><td></td><td class="PType  prettyprint " nowrap>LonSmipMsg&nbsp;</td><td class="PParameterPrefix  prettyprint " nowrap>*</td><td class="PParameter  prettyprint " nowrap>pFrame</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>LdvPutMsg() submits a message for downlink transfer. </div></div><div class=CToolTip id="tt6"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>extern LonApiError LdvGetMsg(</td><td class="PType  prettyprint " nowrap>LdvHandle&nbsp;</td><td class="PParameterPrefix  prettyprint " nowrap></td><td class="PParameter  prettyprint " nowrap>handle,</td></tr><tr><td></td><td class="PType  prettyprint " nowrap>LonSmipMsg&nbsp;</td><td class="PParameterPrefix  prettyprint " nowrap>**</td><td class="PParameter  prettyprint " nowrap>pFrame</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>LdvGetMsg() retrieves an incoming message (if any). </div></div><div class=CToolTip id="tt7"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>extern LonApiError LdvReleaseMsg(</td><td class="PType  prettyprint " nowrap>LdvHandle&nbsp;</td><td class="PParameterPrefix  prettyprint " nowrap></td><td class="PParameter  prettyprint " nowrap>handle,</td></tr><tr><td></td><td class="PType  prettyprint " nowrap>LonSmipMsg&nbsp;</td><td class="PParameterPrefix  prettyprint " nowrap>*</td><td class="PParameter  prettyprint " nowrap>pFrame</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>LdvReleaseMsg() releases the message buffer after processing is complete.</div></div><div class=CToolTip id="tt8"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>extern LonApiError LdvReset(</td><td class="PType  prettyprint " nowrap>LdvHandle&nbsp;</td><td class="PParameter  prettyprint " nowrap>handle</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>LdvReset() resets the driver in a brute force operation, abandoning and dismissing any partial transfers.</div></div><div class=CToolTip id="tt9"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "colspan=3>#define LDV_SUSPEND_IMMEDIATE 0x11 #define LDV_SUSPEND_SYNCHED 0x22 extern LonApiError LdvSuspend(</td></tr><tr><td>&nbsp;&nbsp;&nbsp;</td><td class="PType  prettyprint " nowrap>LdvHandle&nbsp;</td><td class="PParameter  prettyprint " nowrap width=100%>handle,</td></tr><tr><td>&nbsp;&nbsp;&nbsp;</td><td class="PType  prettyprint " nowrap>unsigned&nbsp;</td><td class="PParameter  prettyprint " nowrap width=100%>mode,</td></tr><tr><td>&nbsp;&nbsp;&nbsp;</td><td class="PType  prettyprint " nowrap>unsigned&nbsp;</td><td class="PParameter  prettyprint " nowrap width=100%>timeout</td></tr><tr><td class="PAfterParameters  prettyprint "colspan=3>)</td></tr></table></td></tr></table></blockquote>LdvSuspend() is an optional feature; drivers not supporting this operation may do nothing but return LonApiNotSupported. </div></div><div class=CToolTip id="tt10"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>extern LonApiError LdvResume(</td><td class="PType  prettyprint " nowrap>LdvHandle&nbsp;</td><td class="PParameter  prettyprint " nowrap>handle</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>LdvResume() resumes a previously suspended driver.</div></div><div class=CToolTip id="tt11"><div class=CType>ShortStack LonTalk Compact 2.1 API error codes.</div></div><div class=CToolTip id="tt12"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td><table border=0 cellspacing=0 cellpadding=0><tr><td class="PBeforeParameters  prettyprint "nowrap>extern const LonApiError LonSuspend(</td><td class="PType  prettyprint " nowrap>unsigned&nbsp;</td><td class="PParameter  prettyprint " nowrap>mode,</td></tr><tr><td></td><td class="PType  prettyprint " nowrap>unsigned&nbsp;</td><td class="PParameter  prettyprint " nowrap>timeout</td><td class="PAfterParameters  prettyprint "nowrap>)</td></tr></table></td></tr></table></blockquote>Suspends a link layer driver.</div></div><div class=CToolTip id="tt13"><div class=CFunction><blockquote><table border=0 cellspacing=0 cellpadding=0 class="Prototype"><tr><td class="prettyprint">extern const LonApiError LonResume()</td></tr></table></blockquote>Resumes a suspended link layer driver.</div></div><!--END_ND_TOOLTIPS-->




<div id=MSearchResultsWindow><iframe src="" frameborder=0 name=MSearchResults id=MSearchResults></iframe><a href="javascript:searchPanel.CloseResultsWindow()" id=MSearchResultsWindowClose>Close</a></div>


<script language=JavaScript><!--
if (browserType) {if (browserVer) {document.write("</div>"); }document.write("</div>");}// --></script></body></html>